home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / sun3.md / RCS / userSysCallInt.h,v < prev    next >
Encoding:
Text File  |  1988-06-19  |  1.5 KB  |  65 lines

  1. head     1.1;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 1.1
  9. date     88.06.19.14.30.08;  author ouster;  state Exp;
  10. branches ;
  11. next     ;
  12.  
  13.  
  14. desc
  15. @@
  16.  
  17.  
  18.  
  19. 1.1
  20. log
  21. @Initial revision
  22. @
  23. text
  24. @|*
  25. |* userSysCallInt.h --
  26. |*
  27. |*     Contains macro for stubs for user-level system calls.
  28. |*
  29. |* Copyright 1985, 1988 Regents of the University of California
  30. |* Permission to use, copy, modify, and distribute this
  31. |* software and its documentation for any purpose and without
  32. |* fee is hereby granted, provided that the above copyright
  33. |* notice appear in all copies.  The University of California
  34. |* makes no representations about the suitability of this
  35. |* software for any purpose.  It is provided "as is" without
  36. |* express or implied warranty.
  37. |*
  38. |* rcs = $Header: userSysCallInt.h,v 2.0 87/08/11 09:33:00 brent Exp $ SPRITE (Berkeley)
  39. |*
  40.  
  41. #include "kernel/sysSysCall.h"
  42. #ifndef _USERSYSCALLINT
  43. #define _USERSYSCALLINT
  44. /*
  45.  * ----------------------------------------------------------------------------
  46.  *
  47.  * SYS_CALL --
  48.  *
  49.  *      Define a user-level system call.  The call sets up a trap into a 
  50.  *    system-level routine with the appropriate constant passed as
  51.  *     an argument to specify the type of system call.
  52.  * ----------------------------------------------------------------------------
  53.  */
  54.  
  55. #define SYS_CALL(name, constant) \
  56.     .globl _/**/name; _/**/name: \
  57.     movl #constant, sp@@- ; \
  58.     movl #constant, d0; \
  59.     trap #1; \
  60.     addql #4, sp ; \
  61.     1: rts;
  62.  
  63. #endif _USERSYSCALLINT
  64. @
  65.